package com.gushen.library;

public class ShaderContents {

    public static final String base_frag =
            "precision mediump float;\n" +
            "\n" +
            "varying vec2 aCoord;\n" +
            "\n" +
            "uniform sampler2D vTexture;\n" +
            "\n" +
            "void main(){\n" +
            "    gl_FragColor = texture2D(vTexture,aCoord);\n" +
            "}";


    public static final String base_vertex =
            "attribute vec4 vPosition;\n" +
            "attribute vec2 vCoord;\n" +
            "\n" +
            "varying vec2 aCoord;\n" +
            "void main(){\n" +
            "    gl_Position = vPosition;\n" +
            "    aCoord = vCoord;\n" +
            "}";


    public static final String camera_frag =
            "#extension GL_OES_EGL_image_external : require\n" +
                    "precision mediump float;\n" +
                    "\n" +
                    "varying vec2 aCoord;\n" +
                    "\n" +
                    "uniform samplerExternalOES vTexture;\n" +
                    "\n" +
                    "void main(){\n" +
                    "    gl_FragColor = texture2D(vTexture,aCoord);\n" +
                    "}";


    public static final String camera_vertex =
                    "attribute vec4 vPosition;\n" +
                    "attribute vec4 vCoord;\n" +
                    "uniform mat4 vMatrix;\n" +
                    "varying vec2 aCoord;\n" +
                    "void main(){\n" +
                    "    gl_Position = vPosition;\n" +
                    "    aCoord = (vMatrix * vCoord).xy;\n" +
                    "}";

}
